package hongcaosp.app.android.modle.impl;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.AbsCallback;
import com.lzy.okgo.model.HttpParams;

import hongcaosp.app.android.BuildConfig;
import hongcaosp.app.android.modle.BaseResponse;
import hongcaosp.app.android.modle.DataCallBack;
import hongcaosp.app.android.modle.bean.InviteRecord;
import hongcaosp.app.android.modle.bean.Pagebean;
import hongcaosp.app.android.modle.mi.PrizeModel;

public class PrizeModelImpl implements PrizeModel {

    @Override
    public void invitationCode(String token, String verificationCode, AbsCallback<BaseResponse> callback) {
        HttpParams params = new HttpParams();
        params.put("token",token);
        params.put("verificationCode",verificationCode);
        OkGo.<BaseResponse>post(BuildConfig.HOST + "/api/user/invitationCode").params(params).execute(callback);
    }

    @Override
    public void invitationRecord(String token, int pageNumber, int pageSize, DataCallBack<Pagebean<InviteRecord>> callback) {
        HttpParams params = new HttpParams();
        params.put("token",token);
        params.put("pageNumber",pageNumber);
        params.put("pageSize",pageSize);
        OkGo.<BaseResponse>post(BuildConfig.HOST + "/api/user/invitationRecord").params(params).execute(callback);
    }
}
